package com.ruoyi.web.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.vo.BTaskVo;
import com.ruoyi.system.service.BTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/task")
public class TaskController extends BaseController {

    @Autowired
    BTaskService taskService;

    /**
     * 获任务列表
     */
    @GetMapping("/list")
    public TableDataInfo getList(){
        startPage();
        List<BTaskVo> list = taskService.getList();
        return getDataTable(list);
    }
}
